#!/bin/bash
#访问mysql boar-deploy数据库
#向sys_user表插入一条用户数据
#####
UASERNAME="boar"
PASSWORD="123"
HOSTNAME="20.3.6.171"
DBNAME="boar-deploy"
PORT="3306"
echo "Connectting to mysql"
mysql -h ${HOSTNAME} -P ${PORT} -u ${UASERNAME} -p ${PASSWORD} -D ${DBNAME} -e "source addUser.sql"
echo "Connectting to mysql success"
if [$?=1]; then
	echo "insert success"
fi

exit 0